/* 共用样式 */
.page-title {
  flex: 1;
  text-align: center;
  padding: 10px 0;
}

.page-title h2 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

/* 游戏页面样式 */
.games-main {
  padding-bottom: 20px;
}

.games-filter {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 10px;
}

.games-filter::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  background-color: #f0f2f5;
  border: none;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn.active {
  background-color: #4a90e2;
  color: white;
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 12px;
}

.game-item {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
}

.game-item.premium::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD700'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.game-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.game-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.coming-soon-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.game-info {
  flex: 1;
  margin: 0 12px;
}

.game-info h3 {
  font-size: 16px;
  margin-bottom: 4px;
  color: #333;
}

.game-info p {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-stats {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: #999;
}

.play-btn {
  padding: 8px 16px;
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.play-btn:hover {
  background-color: #3a80d2;
}

.play-btn.disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.recent-games {
  margin-top: 24px;
  padding: 0 12px;
}

.recent-games h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #333;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.recent-item img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  margin-right: 12px;
}

.recent-details {
  flex: 1;
}

.recent-details span:first-child {
  font-size: 14px;
  color: #333;
  display: block;
}

.recent-time {
  font-size: 11px;
  color: #999;
}

.game-score {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

/* 评估页面样式 */
.assessment-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: white;
  border-radius: 16px;
  padding: 20px 16px;
  margin-bottom: 20px;
  text-align: center;
}

.intro-icon {
  width: 120px;
  height: 120px;
  margin-bottom: 16px;
}

.intro-text h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #333;
}

.intro-text p {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

.assessment-metrics {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.metric-item {
  text-align: center;
}

.metric-value {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #4a90e2;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 12px;
  color: #666;
}

.large-btn {
  width: 90%;
  padding: 14px 0;
  font-size: 16px;
  margin: 0 auto 24px;
  display: block;
}

.assessment-history {
  background-color: white;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.history-header h3 {
  font-size: 16px;
  color: #333;
}

.view-all {
  font-size: 14px;
  color: #4a90e2;
  text-decoration: none;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background-color: #f9f9f9;
}

.history-item.recent {
  border: 1px solid #e1f0fe;
  background-color: #f0f7ff;
}

.history-date {
  font-size: 14px;
  color: #666;
  min-width: 80px;
}

.history-result {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.low-stress {
  background-color: #5cb85c;
}

.medium-stress {
  background-color: #f0ad4e;
}

.high-stress {
  background-color: #d9534f;
}

.result-title {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.result-score {
  font-size: 12px;
  color: #999;
}

.view-report {
  padding: 6px 12px;
  background-color: transparent;
  border: 1px solid #4a90e2;
  color: #4a90e2;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.assessment-trends {
  background-color: white;
  border-radius: 16px;
  padding: 16px;
}

.assessment-trends h3 {
  font-size: 16px;
  color: #333;
  margin-bottom: 16px;
}

.trends-chart {
  height: 200px;
  margin-bottom: 16px;
}

.trends-insights {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.insight-item {
  flex: 1;
  min-width: 140px;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.insight-icon {
  font-size: 16px;
}

/* 个人中心页面样式 */
.profile-header {
  justify-content: space-between;
  padding: 0 16px;
}

.settings-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  background-color: white;
  border-radius: 16px;
  margin-bottom: 20px;
}

.user-avatar {
  position: relative;
  margin-bottom: 16px;
}

.user-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #f0f2f5;
}

.edit-avatar {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #4a90e2;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}

.user-details {
  text-align: center;
}

.user-details h2 {
  font-size: 20px;
  margin-bottom: 4px;
  color: #333;
}

.user-status {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

.user-stats {
  display: flex;
  gap: 24px;
}

.stat-item .stat-value {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.stat-item .stat-label {
  font-size: 12px;
  color: #666;
}

.membership-card {
  background: linear-gradient(135deg, #4a90e2, #5cb85c);
  border-radius: 16px;
  padding: 16px;
  color: white;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-icon {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.card-details {
  flex: 1;
}

.card-details h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.card-details p {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.premium-features {
  font-size: 12px;
  opacity: 0.8;
  margin-left: 16px;
  margin-bottom: 8px;
}

.premium-features li {
  margin-bottom: 4px;
}

.upgrade-btn {
  background-color: white;
  color: #4a90e2;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.profile-menu {
  background-color: white;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.menu-section {
  margin-bottom: 20px;
}

.menu-section:last-child {
  margin-bottom: 0;
}

.menu-section h3 {
  font-size: 14px;
  color: #999;
  margin-bottom: 12px;
  padding-left: 12px;
}

.menu-items {
  display: flex;
  flex-direction: column;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 12px;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #f0f2f5;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-icon {
  font-size: 18px;
  margin-right: 16px;
  color: #666;
  width: 24px;
  text-align: center;
}

.menu-text {
  flex: 1;
  font-size: 16px;
}

.menu-arrow {
  color: #ccc;
  font-size: 18px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 22px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4a90e2;
}

input:checked + .slider:before {
  transform: translateX(18px);
}

.logout-btn {
  width: 90%;
  padding: 12px 0;
  background-color: transparent;
  border: 1px solid #f44336;
  color: #f44336;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  margin: 0 auto;
  display: block;
}

/* 响应式调整 */
@media (max-width: 360px) {
  .game-info h3 {
    font-size: 15px;
  }
  
  .play-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .assessment-metrics {
    gap: 16px;
  }
}